package com.example.hospitalManage.controller.admin.api;

import com.example.hospitalManage.entity.Patient;
import com.example.hospitalManage.service.PatientService;
import com.example.hospitalManage.utils.Response;
import com.example.hospitalManage.utils.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @ProjectName: yygh
 * @Author: gxy
 * @Time: 2023/1/3 4:42
 * @Description: 描述
 */
@RestController
@RequestMapping(value = "/admin")
@Api(value = "v1",tags = "获取病人信息相关接口")
@CrossOrigin
public class PatientController {

    @Autowired
    private PatientService patientService;

    @GetMapping(value = "/patient/{patientId}")
    @ApiOperation("根据id查询病人详细信息")
    public ResponseResult getValueByCode(@PathVariable Long patientId) {
        Patient patient = patientService.getById(patientId);
        return Response.createOkResp(patient);
    }


}
